// --------------------------------------------------------------------------------------------------------------------
// <copyright file="LiveObjectContainerDescriptor.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   |  Open Trader - The Open Source Systematic Trading Platform
//   |
//   |  This program is free software: you can redistribute it and/or modify
//   |  it under the terms of the GNU General Public License as published by
//   |  the Free Software Foundation, either version 2 of the License, or
//   |  (at your option) any later version.
//   |
//   |  This program is distributed in the hope that it will be useful,
//   |  but WITHOUT ANY WARRANTY; without even the implied warranty of
//   |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   |  GNU General Public License for more details.
//   |
//   |  You should have received a copy of the GNU General Public License
//   |  along with this program.  If not, see http://www.gnu.org/licenses
//   |
//   |  Up to date informations about Open Trader can be found at :
//   |    http://opentrader.org
//   |    http://opentrader.codeplex.com
//   |
//   |  For professional services, please visit us at :
//   |    http://www.systemathics.com
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Org.OpenTrader.Framework.LiveObjects
{
    #region Using Directives

    using System;

    using Org.OpenTrader.Framework.Enums;
    using Org.OpenTrader.Framework.LiveObjects.Interfaces;

    #endregion

    /// <summary>
    /// The live object container descriptor.
    /// </summary>
    [Serializable]
    public class LiveObjectContainerDescriptor : ILiveObjectContainerDescriptor
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="LiveObjectContainerDescriptor"/> class.
        /// </summary>
        /// <param name="containerType">
        /// The containerType.
        /// </param>
        /// <param name="containerId">
        /// The containerId.
        /// </param>
        /// <param name="containerName">
        /// The containerName.
        /// </param>
        /// <param name="workingDirectory">
        /// The workingDirectory.
        /// </param>
        /// <param name="resources">
        /// The resources.
        /// </param>
        /// <param name="registry">
        /// The registry.
        /// </param>
        public LiveObjectContainerDescriptor(
            ELiveObjectContainerType containerType, 
            Guid containerId, 
            string containerName, 
            string workingDirectory, 
            IResource[] resources, 
            ILiveObjectsRegistry registry)
        {
            this.ID = containerId;
            this.Name = containerName;
            this.WorkingDirectory = workingDirectory;
            this.Resources = resources;
            this.Registry = registry;
            this.Type = containerType;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets ID.
        /// </summary>
        public Guid ID { get; set; }

        /// <summary>
        /// Gets or sets Name.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets Registry.
        /// </summary>
        public ILiveObjectsRegistry Registry { get; set; }

        /// <summary>
        /// Gets or sets Resources.
        /// </summary>
        public IResource[] Resources { get; set; }

        /// <summary>
        /// Gets or sets Type.
        /// </summary>
        public ELiveObjectContainerType Type { get; set; }

        /// <summary>
        /// Gets or sets WorkingDirectory.
        /// </summary>
        public string WorkingDirectory { get; set; }

        #endregion
    }
}